Systems and methods for server load balancing

ABSTRACT

Methods and systems for balancing online stores across servers. Monitoring a level of customer activity associated with a particular online store in a plurality of online stores. Detecting, based on the level of customer activity, a demand-level condition for the particular online store. Responsive to the detecting of the demand-level condition for the particular online store, moving one or more of the plurality of online stores from a first server of a plurality of servers to a second server of the plurality of servers.

FIELD

The present disclosure relates to distributed data processing, and, moreparticularly, to balancing request load among servers such as, forexample, in e-commerce systems.

BACKGROUND

E-commerce systems may encounter heavy loads. For example, particularlyheavy demand may need to be serviced in supporting flash sale events. Aflash sale event may be caused by a promotion of one or more productsthat are offered for sale. As a result of the promotion, an online storemay suddenly receive a high rate of order requests over a short periodof time. Such events place a tremendous strain on e-commerce systems andthird party resources, particularly when millions of customersconcurrently attempt and/or complete checkout.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments will be described, by way of example only, with reference tothe accompanying figures wherein:

FIG. 1 is a block diagram of an e-commerce platform, according to oneembodiment;

FIG. 2 is an example of a home page of an administrator, according toone embodiment;

FIG. 3 is a block diagram of an e-commerce platform, according to oneembodiment;

FIG. 4 shows, in block diagram form, an example data facility of ane-commerce platform, according to one embodiment;

FIG. 5 shows, in flowchart form, an example method for balancing onlinestores across servers, according to one embodiment;

FIGS. 6A-F show, in graphic form, examples of historical levels ofcustomer activity, according to one embodiment; and

FIG. 7 shows, in flowchart form, an example method for balancing onlinestores across servers, according to one embodiment.

DETAILED DESCRIPTION

In one aspect, the present application describes a computer-implementedmethod for balancing online stores across servers. The method mayinclude monitoring a level of customer activity associated with aparticular online store in a plurality of online stores; detecting,based on the level of customer activity, a demand-level condition forthe particular online store; and responsive to the detecting of thedemand-level condition for the particular online store, moving one ormore of the plurality of online stores from a first server of aplurality of servers to a second server of the plurality of servers.

In some implementations, detecting the demand-level condition mayinclude detecting that the level of customer activity is suggestive of acurrent flash sale event.

In some implementations, detecting the demand-level condition mayinclude detecting a projected flash sale event.

In some implementations, detecting the demand-level condition mayinclude detecting a scheduled flash sale event.

In some implementations, the demand-level condition may include a highdemand-level condition.

In some implementations, the demand-level condition may include a lowdemand-level condition.

In some implementations, the method may further include determining,based on a second level of customer activity, the demand-level conditionno longer exists and, in response, moving at least one of the one ormore of the plurality of online stores away from the second server.

In some implementations, moving the one or more of the plurality ofonline stores may include moving the particular online store.

In some implementations, the second server may have increased computingresources in comparison to the first server.

In some implementations, moving the one or more of the plurality ofonline stores may not include moving the particular online store.

In another aspect, the present application describes a system includinga processor; and a memory storing computer-executable instructions that,when executed by the processor, are to cause the processor to monitor alevel of customer activity associated with a particular online store ina plurality of online stores; detect, based on the level of customeractivity, a demand-level condition for the particular online store; andresponsive to the detecting of the demand-level condition for theparticular online store, move one or more of the plurality of onlinestores from a first server of a plurality of servers to a second serverof the plurality of servers.

In some embodiments, the instructions, when executed by the processor,may cause the processor to determine, based on a second level ofcustomer activity, the demand-level condition no longer exists and, inresponse, move at least one of the one or more of the plurality ofonline stores away from the second server.

In another aspect, the present application discloses a non-transitory,computer-readable medium storing processor-executable instructions that,when executed by one or more processors, are to cause the one or moreprocessors to carry out at least some of the operations of a methoddescribed herein.

Other example embodiments of the present disclosure will be apparent tothose of ordinary skill in the art from a review of the followingdetailed descriptions in conjunction with the drawings.

In the present application, the term “and/or” is intended to cover allpossible combinations and sub-combinations of the listed elements,including any one of the listed elements alone, any sub-combination, orall of the elements, and without necessarily excluding additionalelements.

In the present application, the phrase “at least one of . . . and . . .” is intended to cover any one or more of the listed elements, includingany one of the listed elements alone, any sub-combination, or all of theelements, without necessarily excluding any additional elements, andwithout necessarily requiring all of the elements.

In the present application, reference may be made to the term “policy”.A policy may generally refer to a data structure and/or information. Apolicy may include a set of preferences, rules, conditions or othercriteria for defining the behaviour of operations of the e-commerceplatform or a component or function thereof. The policy may be used toprovide store-specific and/or server-specific policy data that iscustomizable on a per-store and/or per-server basis. The policy mayinclude a merchant defined policy or a subscription plan (e.g. a feestructure indicating the level of service provided by an e-commerceplatform to an online store). In some embodiments, the policy may beconfigured, for example, by a merchant via a user interface provided byan e-commerce platform.

An Example E-Commerce Platform

Although integration with a commerce platform is not required, in someembodiments, the methods disclosed herein may be performed on or inassociation with a commerce platform such as an e-commerce platform.Therefore, an example of a commerce platform will be described.

FIG. 1 illustrates an example e-commerce platform 100, according to oneembodiment. The e-commerce platform 100 may be used to provide merchantproducts and services to customers. While the disclosure contemplatesusing the apparatus, system, and process to purchase products andservices, for simplicity the description herein will refer to products.All references to products throughout this disclosure should also beunderstood to be references to products and/or services, including, forexample, physical products, digital content (e.g., music, videos,games), software, tickets, subscriptions, services to be provided, andthe like.

While the disclosure throughout contemplates that a ‘merchant’ and a‘customer’ may be more than individuals, for simplicity the descriptionherein may generally refer to merchants and customers as such. Allreferences to merchants and customers throughout this disclosure shouldalso be understood to be references to groups of individuals, companies,corporations, computing entities, and the like, and may representfor-profit or not-for-profit exchange of products. Further, while thedisclosure throughout refers to ‘merchants’ and ‘customers’, anddescribes their roles as such, the e-commerce platform 100 should beunderstood to more generally support users in an e-commerce environment,and all references to merchants and customers throughout this disclosureshould also be understood to be references to users, such as where auser is a merchant-user (e.g., a seller, retailer, wholesaler, orprovider of products), a customer-user (e.g., a buyer, purchase agent,consumer, or user of products), a prospective user (e.g., a userbrowsing and not yet committed to a purchase, a user evaluating thee-commerce platform 100 for potential use in marketing and sellingproducts, and the like), a service provider user (e.g., a shippingprovider 112, a financial provider, and the like), a company orcorporate user (e.g., a company representative for purchase, sales, oruse of products; an enterprise user; a customer relations or customermanagement agent, and the like), an information technology user, acomputing entity user (e.g., a computing bot for purchase, sales, or useof products), and the like. Furthermore, it may be recognized that whilea given user may act in a given role (e.g., as a merchant) and theirassociated device may be referred to accordingly (e.g., as a merchantdevice) in one context, that same individual may act in a different rolein another context (e.g., as a customer) and that same or anotherassociated device may be referred to accordingly (e.g., as a customerdevice). For example, an individual may be a merchant for one type ofproduct (e.g., shoes), and a customer/consumer of other types ofproducts (e.g., groceries). In another example, an individual may beboth a consumer and a merchant of the same type of product. In aparticular example, a merchant that trades in a particular category ofgoods may act as a customer for that same category of goods when theyorder from a wholesaler (the wholesaler acting as merchant).

The e-commerce platform 100 provides merchants with onlineservices/facilities to manage their business. The facilities describedherein are shown implemented as part of the platform 100 but could alsobe configured separately from the platform 100, in whole or in part, asstand-alone services. Furthermore, such facilities may, in someembodiments, may, additionally or alternatively, be provided by one ormore providers/entities.

In the example of FIG. 1 , the facilities are deployed through amachine, service or engine that executes computer software, modules,program codes, and/or instructions on one or more processors which, asnoted above, may be part of or external to the platform 100. Merchantsmay utilize the e-commerce platform 100 for enabling or managingcommerce with customers, such as by implementing an e-commerceexperience with customers through an online store 138, applications142A-B, channels 110A-B, and/or through point of sale (POS) devices 152in physical locations (e.g., a physical storefront or other locationsuch as through a kiosk, terminal, reader, printer, 3D printer, and thelike). A merchant may utilize the e-commerce platform 100 as a solecommerce presence with customers, or in conjunction with other merchantcommerce facilities, such as through a physical store (e.g.,‘brick-and-mortar’ retail stores), a merchant off-platform website 104(e.g., a commerce Internet website or other internet or web property orasset supported by or on behalf of the merchant separately from thee-commerce platform 100), an application 142B, and the like. However,even these ‘other’ merchant commerce facilities may be incorporated intoor communicate with the e-commerce platform 100, such as where POSdevices 152 in a physical store of a merchant are linked into thee-commerce platform 100, where a merchant off-platform website 104 istied into the e-commerce platform 100, such as, for example, through‘buy buttons’ that link content from the merchant off platform website104 to the online store 138, or the like.

The online store 138 may represent a multi-tenant facility comprising aplurality of virtual storefronts. In embodiments, merchants mayconfigure and/or manage one or more storefronts in the online store 138,such as, for example, through a merchant device 102 (e.g., computer,laptop computer, mobile computing device, and the like), and offerproducts to customers through a number of different channels 110A-B(e.g., an online store 138; an application 142A-B; a physical storefrontthrough a POS device 152; an electronic marketplace, such, for example,through an electronic buy button integrated into a website or socialmedia channel such as on a social network, social media page, socialmedia messaging system; and/or the like). A merchant may sell acrosschannels 110A-B and then manage their sales through the e-commerceplatform 100, where channels 110A may be provided as a facility orservice internal or external to the e-commerce platform 100. A merchantmay, additionally or alternatively, sell in their physical retail store,at pop ups, through wholesale, over the phone, and the like, and thenmanage their sales through the e-commerce platform 100. A merchant mayemploy all or any combination of these operational modalities. Notably,it may be that by employing a variety of and/or a particular combinationof modalities, a merchant may improve the probability and/or volume ofsales. Throughout this disclosure the terms online store 138 andstorefront may be used synonymously to refer to a merchant's onlinee-commerce service offering through the e-commerce platform 100, wherean online store 138 may refer either to a collection of storefrontssupported by the e-commerce platform 100 (e.g., for one or a pluralityof merchants) or to an individual merchant's storefront (e.g., amerchant's online store).

In some embodiments, a customer may interact with the platform 100through a customer device 150 (e.g., computer, laptop computer, mobilecomputing device, or the like), a POS device 152 (e.g., retail device,kiosk, automated (self-service) checkout system, or the like), and/orany other commerce interface device known in the art. The e-commerceplatform 100 may enable merchants to reach customers through the onlinestore 138, through applications 142A-B, through POS devices 152 inphysical locations (e.g., a merchant's storefront or elsewhere), tocommunicate with customers via electronic communication facility 129,and/or the like so as to provide a system for reaching customers andfacilitating merchant services for the real or virtual pathwaysavailable for reaching and interacting with customers.

In some embodiments, and as described further herein, the e-commerceplatform 100 may be implemented through a processing facility. Such aprocessing facility may include a processor and a memory. The processormay be a hardware processor. The memory may be and/or may include anon-transitory computer-readable medium. The memory may be and/or mayinclude random access memory (RAM) and/or persisted storage (e.g.,magnetic storage). The processing facility may store a set ofinstructions (e.g., in the memory) that, when executed, cause thee-commerce platform 100 to perform the e-commerce and support functionsas described herein. The processing facility may be or may be a part ofone or more of a server, client, network infrastructure, mobilecomputing platform, cloud computing platform, stationary computingplatform, and/or some other computing platform, and may provideelectronic connectivity and communications between and amongst thecomponents of the e-commerce platform 100, merchant devices 102, paymentgateways 106, applications 142A-B , channels 110A-B, shipping providers112, customer devices 150, point of sale devices 152, etc.. In someimplementations, the processing facility may be or may include one ormore such computing devices acting in concert. For example, it may bethat a plurality of co-operating computing devices serves as/to providethe processing facility. The e-commerce platform 100 may be implementedas or using one or more of a cloud computing service, software as aservice (SaaS), infrastructure as a service (IaaS), platform as aservice (PaaS), desktop as a service (DaaS), managed software as aservice (MSaaS), mobile backend as a service (MBaaS), informationtechnology management as a service (ITMaaS), and/or the like. Forexample, it may be that the underlying software implementing thefacilities described herein (e.g., the online store 138) is provided asa service, and is centrally hosted (e.g., and then accessed by users viaa web browser or other application, and/or through customer devices 150,POS devices 152, and/or the like). In some embodiments, elements of thee-commerce platform 100 may be implemented to operate and/or integratewith various other platforms and operating systems.

In some embodiments, the facilities of the e-commerce platform 100(e.g., the online store 138) may serve content to a customer device 150(using data 134) such as, for example, through a network connected tothe e-commerce platform 100. For example, the online store 138 may serveor send content in response to requests for data 134 from the customerdevice 150, where a browser (or other application) connects to theonline store 138 through a network using a network communicationprotocol (e.g., an internet protocol). The content may be written inmachine readable language and may include Hypertext Markup Language(HTML), template language, JavaScript, and the like, and/or anycombination thereof.

In some embodiments, online store 138 may be or may include serviceinstances that serve content to customer devices and allow customers tobrowse and purchase the various products available (e.g., add them to acart, purchase through a buy-button, and the like). Merchants may alsocustomize the look and feel of their website through a theme system,such as, for example, a theme system where merchants can select andchange the look and feel of their online store 138 by changing theirtheme while having the same underlying product and business data shownwithin the online store's product information. It may be that themes canbe further customized through a theme editor, a design interface thatenables users to customize their website's design with flexibility.Additionally or alternatively, it may be that themes can, additionallyor alternatively, be customized using theme-specific settings such as,for example, settings as may change aspects of a given theme, such as,for example, specific colors, fonts, and pre-built layout schemes. Insome implementations, the online store may implement a contentmanagement system for website content. Merchants may employ such acontent management system in authoring blog posts or static pages andpublish them to their online store 138, such as through blogs, articles,landing pages, and the like, as well as configure navigation menus.Merchants may upload images (e.g., for products), video, content, data,and the like to the e-commerce platform 100, such as for storage by thesystem (e.g., as data 134). In some embodiments, the e-commerce platform100 may provide functions for manipulating such images and content suchas, for example, functions for resizing images, associating an imagewith a product, adding and associating text with an image, adding animage for a new product variant, protecting images, and the like.

As described herein, the e-commerce platform 100 may provide merchantswith sales and marketing services for products through a number ofdifferent channels 110A-B, including, for example, the online store 138,applications 142A-B, as well as through physical POS devices 152 asdescribed herein. The e-commerce platform 100 may, additionally oralternatively, include business support services 116, an administrator114, a warehouse management system, and the like associated with runningan on-line business, such as, for example, one or more of providing adomain registration service 118 associated with their online store,payment services 120 for facilitating transactions with a customer,shipping services 122 for providing customer shipping options forpurchased products, fulfillment services for managing inventory, riskand insurance services 124 associated with product protection andliability, merchant billing, and the like. Services 116 may be providedvia the e-commerce platform 100 or in association with externalfacilities, such as through a payment gateway 106 for paymentprocessing, shipping providers 112 for expediting the shipment ofproducts, and the like.

In some embodiments, the e-commerce platform 100 may be configured withshipping services 122 (e.g., through an e-commerce platform shippingfacility or through a third-party shipping carrier), to provide variousshipping-related information to merchants and/or their customers suchas, for example, shipping label or rate information, real-time deliveryupdates, tracking, and/or the like.

FIG. 2 depicts a non-limiting embodiment for a home page of anadministrator 114. The administrator 114 may be referred to as anadministrative console and/or an administrator console. Theadministrator 114 may show information about daily tasks, a store'srecent activity, and the next steps a merchant can take to build theirbusiness. In some embodiments, a merchant may log in to theadministrator 114 via a merchant device 102 (e.g., a desktop computer ormobile device), and manage aspects of their online store 138, such as,for example, viewing the online store's 138 recent visit or orderactivity, updating the online store's 138 catalog, managing orders,and/or the like. In some embodiments, the merchant may be able to accessthe different sections of the administrator 114 by using a sidebar, suchas the one shown on FIG. 2 . Sections of the administrator 114 mayinclude various interfaces for accessing and managing core aspects of amerchant's business, including orders, products, customers, availablereports and discounts. The administrator 114 may, additionally oralternatively, include interfaces for managing sales channels for astore including the online store 138, mobile application(s) madeavailable to customers for accessing the store (Mobile App), POSdevices, and/or a buy button. The administrator 114 may, additionally oralternatively, include interfaces for managing applications (apps)installed on the merchant's account; and settings applied to amerchant's online store 138 and account. A merchant may use a search barto find products, pages, or other information in their store.

More detailed information about commerce and visitors to a merchant'sonline store 138 may be viewed through reports or metrics. Reports mayinclude, for example, acquisition reports, behavior reports, customerreports, finance reports, marketing reports, sales reports, productreports, and custom reports. The merchant may be able to view sales datafor different channels 110A-B from different periods of time (e.g.,days, weeks, months, and the like), such as by using drop-down menus. Anoverview dashboard may also be provided for a merchant who wants a moredetailed view of the store's sales and engagement data. An activity feedin the home metrics section may be provided to illustrate an overview ofthe activity on the merchant's account. For example, by clicking on a‘view all recent activity’ dashboard button, the merchant may be able tosee a longer feed of recent activity on their account. A home page mayshow notifications about the merchant's online store 138, such as basedon account status, growth, recent customer activity, order updates, andthe like. Notifications may be provided to assist a merchant withnavigating through workflows configured for the online store 138, suchas, for example, a payment workflow, an order fulfillment workflow, anorder archiving workflow, a return workflow, and the like.

The e-commerce platform 100 may provide for a communications facility129 and associated merchant interface for providing electroniccommunications and marketing, such as utilizing an electronic messagingfacility for collecting and analyzing communication interactions betweenmerchants, customers, merchant devices 102, customer devices 150, POSdevices 152, and the like, to aggregate and analyze the communications,such as for increasing sale conversions, and the like. For instance, acustomer may have a question related to a product, which may produce adialog between the customer and the merchant (or an automatedprocessor-based agent/chatbot representing the merchant), where thecommunications facility 129 is configured to provide automated responsesto customer requests and/or provide recommendations to the merchant onhow to respond such as, for example, to improve the probability of asale.

The e-commerce platform 100 may provide a financial facility 120 forsecure financial transactions with customers, such as through a securecard server environment. The e-commerce platform 100 may store creditcard information, such as in payment card industry data (PCI)environments (e.g., a card server), to reconcile financials, billmerchants, perform automated clearing house (ACH) transfers between thee-commerce platform 100 and a merchant's bank account, and the like. Thefinancial facility 120 may also provide merchants and buyers withfinancial support, such as through the lending of capital (e.g., lendingfunds, cash advances, and the like) and provision of insurance. In someembodiments, online store 138 may support a number of independentlyadministered storefronts and process a large volume of transactionaldata on a daily basis for a variety of products and services.Transactional data may include any customer information indicative of acustomer, a customer account or transactions carried out by a customersuch as. for example, contact information, billing information, shippinginformation, returns/refund information, discount/offer information,payment information, or online store events or information such as pageviews, product search information (search keywords, click-throughevents), product reviews, abandoned carts, and/or other transactionalinformation associated with business through the e-commerce platform100. In some embodiments, the e-commerce platform 100 may store thisdata in a data facility 134. Referring again to FIG. 1 , in someembodiments the e-commerce platform 100 may include a commercemanagement engine 136 such as may be configured to perform variousworkflows for task automation or content management related to products,inventory, customers, orders, suppliers, reports, financials, risk andfraud, and the like. In some embodiments, additional functionality may,additionally or alternatively, be provided through applications 142A-Bto enable greater flexibility and customization required foraccommodating an ever-growing variety of online stores, POS devices,products, and/or services. Applications 142A may be components of thee-commerce platform 100 whereas applications 142B may be provided orhosted as a third-party service external to e-commerce platform 100. Thecommerce management engine 136 may accommodate store-specific workflowsand in some embodiments, may incorporate the administrator 114 and/orthe online store 138.

Implementing functions as applications 142A-B may enable the commercemanagement engine 136 to remain responsive and reduce or avoid servicedegradation or more serious infrastructure failures, and the like.

Although isolating online store data can be important to maintainingdata privacy between online stores 138 and merchants, there may bereasons for collecting and using cross-store data, such as, for example,with an order risk assessment system or a platform payment facility,both of which require information from multiple online stores 138 toperform well. In some embodiments, it may be preferable to move thesecomponents out of the commerce management engine 136 and into their owninfrastructure within the e-commerce platform 100.

Platform payment facility 120 is an example of a component that utilizesdata from the commerce management engine 136 but is implemented as aseparate component or service. The platform payment facility 120 mayallow customers interacting with online stores 138 to have their paymentinformation stored safely by the commerce management engine 136 suchthat they only have to enter it once. When a customer visits a differentonline store 138, even if they have never been there before, theplatform payment facility 120 may recall their information to enable amore rapid and/or potentially less-error prone (e.g., through avoidanceof possible mis-keying of their information if they needed to insteadre-enter it) checkout. This may provide a cross-platform network effect,where the e-commerce platform 100 becomes more useful to its merchantsand buyers as more merchants and buyers join, such as because there aremore customers who checkout more often because of the ease of use withrespect to customer purchases. To maximize the effect of this network,payment information for a given customer may be retrievable and madeavailable globally across multiple online stores 138.

For functions that are not included within the commerce managementengine 136, applications 142A-B provide a way to add features to thee-commerce platform 100 or individual online stores 138. For example,applications 142A-B may be able to access and modify data on amerchant's online store 138, perform tasks through the administrator114, implement new flows for a merchant through a user interface (e.g.,that is surfaced through extensions/API), and the like. Merchants may beenabled to discover and install applications 142A-B through applicationsearch, recommendations, and support 128. In some embodiments, thecommerce management engine 136, applications 142A-B, and theadministrator 114 may be developed to work together. For instance,application extension points may be built inside the commerce managementengine 136, accessed by applications 142A and 142B through theinterfaces 140B and 140A to deliver additional functionality, andsurfaced to the merchant in the user interface of the administrator 114.

In some embodiments, applications 142A-B may deliver functionality to amerchant through the interface 140A-B, such as where an application142A-B is able to surface transaction data to a merchant (e.g., App:“Engine, surface my app data in the Mobile App or administrator 114”),and/or where the commerce management engine 136 is able to ask theapplication to perform work on demand (Engine: “App, give me a local taxcalculation for this checkout”).

Applications 142A-B may be connected to the commerce management engine136 through an interface 140A-B (e.g., through REST (REpresentationalState Transfer) and/or GraphQL APIs) to expose the functionality and/ordata available through and within the commerce management engine 136 tothe functionality of applications. For instance, the e-commerce platform100 may provide API interfaces 140A-B to applications 142A-B which mayconnect to products and services external to the platform 100. Theflexibility offered through use of applications and APIs (e.g., asoffered for application development) enable the e-commerce platform 100to better accommodate new and unique needs of merchants or to addressspecific use cases without requiring constant change to the commercemanagement engine 136. For instance, shipping services 122 may beintegrated with the commerce management engine 136 through a shipping orcarrier service API, thus enabling the e-commerce platform 100 toprovide shipping service functionality without directly impacting coderunning in the commerce management engine 136.

Depending on the implementation, applications 142A-B may utilize APIs topull data on demand (e.g., customer creation events, product changeevents, or order cancelation events, etc.) or have the data pushed whenupdates occur. A subscription model may be used to provide applications142A-B with events as they occur or to provide updates with respect to achanged state of the commerce management engine 136. In someembodiments, when a change related to an update event subscriptionoccurs, the commerce management engine 136 may post a request, such asto a predefined callback URL. The body of this request may contain a newstate of the object and a description of the action or event. Updateevent subscriptions may be created manually, in the administratorfacility 114, or automatically (e.g., via the API 140A-B). In someembodiments, update events may be queued and processed asynchronouslyfrom a state change that triggered them, which may produce an updateevent notification that is not distributed in real-time or near-realtime.

In some embodiments, the e-commerce platform 100 may provide one or moreof application search, recommendation and support 128. Applicationsearch, recommendation and support 128 may include developer productsand tools to aid in the development of applications, an applicationdashboard (e.g., to provide developers with a development interface, toadministrators for management of applications, to merchants forcustomization of applications, and the like), facilities for installingand providing permissions with respect to providing access to anapplication 142A-B (e.g., for public access, such as where criteria mustbe met before being installed, or for private use by a merchant),application searching to make it easy for a merchant to search forapplications 142A-B that satisfy a need for their online store 138,application recommendations to provide merchants with suggestions on howthey can improve the user experience through their online store 138, andthe like. In some embodiments, applications 142A-B may be assigned anapplication identifier (ID), such as for linking to an application(e.g., through an API), searching for an application, making applicationrecommendations, and the like.

Applications 142A-B may be grouped roughly into three categories:customer-facing applications, merchant-facing applications, integrationapplications, and the like. Customer-facing applications 142A-B mayinclude an online store 138 or channels 110A-B that are places wheremerchants can list products and have them purchased (e.g., the onlinestore, applications for flash sales (e.g., merchant products or fromopportunistic sales opportunities from third-party sources), a mobilestore application, a social media channel, an application for providingwholesale purchasing, and the like). Merchant-facing applications 142A-Bmay include applications that allow the merchant to administer theironline store 138 (e.g., through applications related to the web orwebsite or to mobile devices), run their business (e.g., throughapplications related to POS devices), to grow their business (e.g.,through applications related to shipping (e.g., drop shipping), use ofautomated agents, use of process flow development and improvements), andthe like. Integration applications may include applications that provideuseful integrations that participate in the running of a business, suchas shipping providers 112 and payment gateways 106.

As such, the e-commerce platform 100 can be configured to provide anonline shopping experience through a flexible system architecture thatenables merchants to connect with customers in a flexible andtransparent manner. A typical customer experience may be betterunderstood through an embodiment example purchase workflow, where thecustomer browses the merchant's products on a channel 110A-B, adds whatthey intend to buy to their cart, proceeds to checkout, and pays for thecontent of their cart resulting in the creation of an order for themerchant. The merchant may then review and fulfill (or cancel) theorder. The product is then delivered to the customer. If the customer isnot satisfied, they might return the products to the merchant.

In an example embodiment, a customer may browse a merchant's productsthrough a number of different channels 110A-B such as, for example, themerchant's online store 138, a physical storefront through a POS device152; an electronic marketplace, through an electronic buy buttonintegrated into a website or a social media channel). In some cases,channels 110A-B may be modeled as applications 142A-B. A merchandisingcomponent in the commerce management engine 136 may be configured forcreating, and managing product listings (using product data objects ormodels for example) to allow merchants to describe what they want tosell and where they sell it. The association between a product listingand a channel may be modeled as a product publication and accessed bychannel applications, such as via a product listing API. A product mayhave many attributes and/or characteristics, like size and color, andmany variants that expand the available options into specificcombinations of all the attributes, like a variant that is sizeextra-small and green, or a variant that is size large and blue.Products may have at least one variant (e.g., a “default variant”)created for a product without any options. To facilitate browsing andmanagement, products may be grouped into collections, provided productidentifiers (e.g., stock keeping unit (SKU)) and the like. Collectionsof products may be built by either manually categorizing products intoone (e.g., a custom collection), by building rulesets for automaticclassification (e.g., a smart collection), and the like. Productlistings may include 2D images, 3D images or models, which may be viewedthrough a virtual or augmented reality interface, and the like.

In some embodiments, a shopping cart object is used to store or keeptrack of the products that the customer intends to buy. The shoppingcart object may be channel specific and can be composed of multiple cartline items, where each cart line item tracks the quantity for aparticular product variant. Since adding a product to a cart does notimply any commitment from the customer or the merchant, and the expectedlifespan of a cart may be in the order of minutes (not days), cartobjects/data representing a cart may be persisted to an ephemeral datastore.

The customer then proceeds to checkout. A checkout object or pagegenerated by the commerce management engine 136 may be configured toreceive customer information to complete the order such as thecustomer's contact information, billing information and/or shippingdetails. If the customer inputs their contact information but does notproceed to payment, the e-commerce platform 100 may (e.g., via anabandoned checkout component) transmit a message to the customer device150 to encourage the customer to complete the checkout. For thosereasons, checkout objects can have much longer lifespans than cartobjects (hours or even days) and may therefore be persisted. Customersthen pay for the content of their cart resulting in the creation of anorder for the merchant. In some embodiments, the commerce managementengine 136 may be configured to communicate with various paymentgateways and services 106 (e.g., online payment systems, mobile paymentsystems, digital wallets, credit card gateways) via a payment processingcomponent. The actual interactions with the payment gateways 106 may beprovided through a card server environment. At the end of the checkoutprocess, an order is created. An order is a contract of sale between themerchant and the customer where the merchant agrees to provide the goodsand services listed on the order (e.g., order line items, shipping lineitems, and the like) and the customer agrees to provide payment(including taxes). Once an order is created, an order confirmationnotification may be sent to the customer and an order placednotification sent to the merchant via a notification component.Inventory may be reserved when a payment processing job starts to avoidover-selling (e.g., merchants may control this behavior using aninventory policy or configuration for each variant). Inventoryreservation may have a short time span (minutes) and may need to be fastand scalable to support flash sales or “drops”, which are events duringwhich a discount, promotion or limited inventory of a product may beoffered for sale for buyers in a particular location and/or for aparticular (usually short) time. The reservation is released if thepayment fails. When the payment succeeds, and an order is created, thereservation is converted into a permanent (long-term) inventorycommitment allocated to a specific location. An inventory component ofthe commerce management engine 136 may record where variants arestocked, and track quantities for variants that have inventory trackingenabled. It may decouple product variants (a customer-facing conceptrepresenting the template of a product listing) from inventory items (amerchant-facing concept that represents an item whose quantity andlocation is managed). An inventory level component may keep track ofquantities that are available for sale, committed to an order orincoming from an inventory transfer component (e.g., from a vendor).

The merchant may then review and fulfill (or cancel) the order. A reviewcomponent of the commerce management engine 136 may implement a businessprocess merchant's use to ensure orders are suitable for fulfillmentbefore actually fulfilling them. Orders may be fraudulent, requireverification (e.g., ID checking), have a payment method which requiresthe merchant to wait to make sure they will receive their funds, and thelike. Risks and recommendations may be persisted in an order risk model.Order risks may be generated from a fraud detection tool, submitted by athird-party through an order risk API, and the like. Before proceedingto fulfillment, the merchant may need to capture the payment information(e.g., credit card information) or wait to receive it (e.g., via a banktransfer, check, and the like) before it marks the order as paid. Themerchant may now prepare the products for delivery. In some embodiments,this business process may be implemented by a fulfillment component ofthe commerce management engine 136. The fulfillment component may groupthe line items of the order into a logical fulfillment unit of workbased on an inventory location and fulfillment service. The merchant mayreview, adjust the unit of work, and trigger the relevant fulfillmentservices, such as through a manual fulfillment service (e.g., atmerchant managed locations) used when the merchant picks and packs theproducts in a box, purchase a shipping label and input its trackingnumber, or just mark the item as fulfilled. Alternatively, an APIfulfillment service may trigger a third-party application or service tocreate a fulfillment record for a third-party fulfillment service. Otherpossibilities exist for fulfilling an order. If the customer is notsatisfied, they may be able to return the product(s) to the merchant.The business process merchants may go through to “un-sell” an item maybe implemented by a return component. Returns may consist of a varietyof different actions, such as a restock, where the product that was soldactually comes back into the business and is sellable again; a refund,where the money that was collected from the customer is partially orfully returned; an accounting adjustment noting how much money wasrefunded (e.g., including if there was any restocking fees or goods thatweren't returned and remain in the customer's hands); and the like. Areturn may represent a change to the contract of sale (e.g., the order),and where the e-commerce platform 100 may make the merchant aware ofcompliance issues with respect to legal obligations (e.g., with respectto taxes). In some embodiments, the e-commerce platform 100 may enablemerchants to keep track of changes to the contract of sales over time,such as implemented through a sales model component (e.g., anappend-only date-based ledger that records sale-related events thathappened to an item).

Balancing Load Across Servers

FIG. 3 illustrates an example e-commerce platform 300 in block diagramform. The e-commerce platform 300 of FIG. 3 is illustrated as distinctfrom the e-commerce platform 100 of FIG. 1 for ease of illustration, butthese e-commerce platforms may be implemented together as a singlee-commerce platform. In other words, aspects of one of the e-commerceplatforms 100 and 300 may be implemented as part of the other e-commerceplatform.

The e-commerce platform 300 may be implemented as a software as aservice. In other words, the e-commerce platform 300 may be delivered asa service by a service provider to a service consumer, namely, amerchant. The service provider may manage or control the installation,configuration, operation and maintenance of the software that implementsthe e-commerce platform 300. The service provider may also manage orcontrol resources used by the e-commerce platform 300, such as serversand data facilities, or may configure the e-commerce platform 300 to usethird-party resources. The service provided by the e-commerce platformmay sometimes be referred to as an online store hosting service. Amerchant may obtain a license to use the store hosting capabilities of arunning instance of the e-commerce platform 300. The e-commerce platformmay provide merchants with facilities for creating an online store 138.

The e-commerce platform 300 includes a router 302 and a plurality ofservers 304 (shown individually as 304 a, 304 b, 304 c, 304 d). Theservers 304 host a plurality of online stores. More than one onlinestore may be hosted per server. Each of the servers 304 may also includeone or more components of the e-commerce platform 100 of FIG. 1 in orderto host online stores. For example, each of the servers 304 may includea respective running instance of the commerce management engine 136 ofFIG. 1 .

The e-commerce platform 300 may further include a router 302. The routermay receive, via the e-commerce platform and from a customer device,requests corresponding to an online store. The router may be configuredto, upon receiving a request, identify an online store that correspondsto the request based on the request itself. For example, the router mayanalyze the contents of the request in order to determine a uniqueidentifier corresponding to an online store. The request may beimplemented as an HTTP request and include a destination domain name andone or more parameters. The destination domain name may uniquelyidentify a store. In some embodiments, the one or more parametersincluded in the request may also be used to uniquely identify an onlinestore. By way of example, the request may include a name/value pair, forexample, a parameter name “storeld” and a corresponding value“johnsapparel”, which may be a unique store identifier. The router maymap the identified store to one of the servers 304. By way of example, alookup table may, in at least some instances, be used to map onlinestore identifiers to server identifiers. The router may then direct therequest to the identified server. In this way, the router 302 may directrequests received by the e-commerce platform 300 from customer devicesto one of the servers 304.

The e-commerce platform 300 may include a customer activity monitor 306that monitors the level of customer activity on the router 302 or theservers 304. As an example, the customer activity monitor 306 may obtaindata regarding the current traffic on the router 302 and on the servers304. The customer activity monitor 306 may be configured to providemetrics for individual online stores hosted on the servers 304. Thelevel of customer activity may vary from one online store to anotheronline store.

The e-commerce platform 300 may include a scheduler 308 that isconfigured to trigger the performance of a store-specific action at ascheduled time. The action may include the launch of an online marketingcampaign, the online release of a new product, or such other action.

It will be appreciated that although the customer activity monitor 306and scheduler 308 are illustrated as separate elements from the router302 and the servers 304 for ease of explanation, they may be implementedas separate software applications or modules, or partially or completelytogether as one software application or module, or as part of a largersoftware application or module, within or outside the router 302 and theservers 304.

Reference is now made to FIG. 4 , which partially illustrates an exampledata facility 400 of an e-commerce platform in block diagram form. Thedata facility may be a data facility 134 of the example e-commerceplatform 100 of FIG. 1 or the example e-commerce platform 300 of FIG. 3or a data facility external to an e-commerce platform. Not allcomponents of the data facility 400 are illustrated. The data facility400 may include one or more data storage units. In some cases, the datastorage may be in database format and may include one or more databases.The databases may be relational databases in some examples. The datafacility 400 is illustrated as a single unit for ease of illustration,but may include a plurality of storage units.

The data facility 400 may contain various types of data including onlinestore data, server data, and routing data. The online store data mayinclude data corresponding to the online stores 138, the server data mayinclude data corresponding to the servers 304, and the routing data mayinclude data corresponding to the online stores 138 and servers 304.

The data facility 400 may store data regarding an online store in astore object 402. The store object 402 may be a data structure and mayinclude details regarding an online store. Example details include astore identifier, a store name, a domain name, product cataloginformation, order information, scheduler information, policies andhistorical analytics data. The store identifier and domain name may beunique identifiers of an online store hosted on the e-commerce platform.The details may include data received by the e-commerce platform from amerchant device, such as product catalog information and may alsoinclude data generated by the system, such as a store identifier andhistorical analytics data.

The data facility 400 may store data regarding a server of thee-commerce platform in a server object 404. The server object 404 may bea data structure and may include details regarding a server. Exampledetails include a server identifier, hostname, IP address, and ratedcapacity corresponding to the server. The server identifier, hostnameand IP address may be unique identifiers of a server.

The term “rated capacity” may generally refer to a maximum load, orlevel of activity, a server is designed to withstand. If the load oractivity on the server is greater than that for which the server wasdesigned, the server may be referred to as being “overloaded”. A serverthat is overloaded may experience complete failure or a degradation inperformance beyond an acceptable threshold level. In other words, ratedcapacity may refer to the maximum level of activity a server is designedto be subjected to without complete failure of the server, failure of acomponent of the server, and/or degradation in the performance of theserver beyond a defined threshold. The rated capacity may be expressed,for example, in the same units as one or more of the metrics monitoredby the e-commerce platform. For example, the rated capacity of a servermay be indicated as a maximum number of requests received per second. Insome embodiments, the rated capacity may refer to a maximum recommendedcapacity as stated by a provider or manufacturer of the server. In someembodiments, the rated capacity is a value that is calculated by thee-commerce platform based on characteristics of the server, such as, forexample, the number of processors included in the server and the speedof those processors.

The data facility 400 may further store data for routing for requests ina routing object 406. In some embodiments, the routing object mayinclude a plurality of mapping definitions in a lookup table. A mappingdefinition may be defined for specifying a mapping of a parameter of arequest associated with an online store to a server identifier includedin the routing object. For example, a lookup table may, in at least someembodiments, be used to map a domain name of a request to a serveridentifier. By way of example, a lookup table may include associationssuch as: requests to “johnsapparel.com” are routed to “serverA.com”;requests to “janesapparel.com” are routed to “serverB.com”; requests to“dicksapparel.com” are routed to “192.0.2.0”. In this example, if thestore identifier is “johnsapparel.com”, a router may use the lookuptable to map the request to the server identified as “serverA.com”. Therouter may use the server identifier to forward the request to theserver corresponding to that server identifier.

Although many of the above examples refer to an “object” when discussinga data structure, it will be appreciated that this does not necessarilyrestrict the present application to implementation using object-orientedprogramming languages, and does not necessarily imply that the datastructure is of a particular type or format. Data structures may havedifferent names in different software paradigms. An object may beillustrated as a single unit for ease of illustration, but may include aplurality of objects.

Reference is now made to FIGS. 5 and 7 , which show various methods 500and 700 related to balancing online stores across servers. These variousmethods may be implemented by a system suitably programmed to carry outthe functions described. The system may be configured to receive orrespond to communications from one or more user devices. A user devicemay be implemented by a customer device, such as the customer device 150of FIG. 1 . The system may include the example e-commerce platform 100of FIG. 1 or 300 of FIG. 3 ; however, an implementation in an e-commerceplatform is only one example. At least some of the operations may alsobe implemented on any device or server, as a stand-alone component orservice that is external to an e-commerce platform. In some embodiments,the operations may be provided as a cloud computing service, a softwareas a service (SaaS), and the like. Other possibilities exist. Forexample, more broadly, the various operations and techniques describedherein may be employed in other application domains than e-commerce. Ina particular example, the subject matter of the present applicationcould be used to balance running instances of applications or othermanners of computing services such as, for example, various cloud basedservices.

Reference will now be made to FIG. 5 , which shows, in flowchart form, asimplified example method 500 for balancing online stores acrossservers.

The method 500 includes, in operation 502, monitoring a level ofcustomer activity corresponding to an online store. A level of customeractivity may refer to an amount or quantity of customer activity over adefined period of time. The level of customer activity may be monitoredcontinuously over successive windows of time. The length of each windowmay be, for example, a day, hour or minute. In some embodiments, thelevel of customer activity may be monitored over windows of time, suchas, for example, short windows like 10 seconds, 30 seconds, or a minute,or, more broadly, some other temporal window.

Monitoring a level of customer activity may include monitoring usage ofan online store by a customer device. Monitoring usage of an onlinestore may include monitoring a level of interaction of a user of acustomer device with a user interface corresponding to an online store.By way of example, monitoring the level of customer activity may includemonitoring manual actions taken by customers. In some embodiments, arequest may indicate a manual action taken by a user of a customerdevice. For example, the e-commerce platform may receive user input fromthe customer device, via an actionable user interface element, forproceeding to checkout or purchasing a particular product immediately.For example, the request may indicate a user selection of a “Proceed toCheckout” button or a “Buy Now” button on a webpage of an online storehosted on the e-commerce platform. By way of another example, thee-commerce platform may receive user input via an actionable userinterface element provided as a link. The link may be in the form of animage that is selectable or clickable by a user. The image may be anadvertisement or promotion of a product. The request may indicate theselection of the image by the user. The e-commerce platform may countthe number of requests received that indicate the selection of aparticular user interface element. The rate at which the requests arereceived may generally be referred to as a “click rate” for that userinterface element.

Monitoring a level of customer activity may include monitoring a levelof usage of a resource by an online store. For example, the router orserver may receive, from a customer device, a request corresponding toan online store. The request may be associated with or indicate anaction to be taken by the server. The action may include or involveaccessing a resource. The e-commerce platform may monitor the number oftimes that a particular resource is accessed in response to receiving,from customer devices, requests corresponding to the online store. Thenumber of times a particular resource is accessed in response toindividual requests may vary from one request to another. Examples ofresources that may be associated with the request include a checkoutfunction, order function, payment function, shipping rate function, taxrate function, credit card validation function, address validationfunction, postal or zip code validation function, order form validationfunction, order tracking function, order return function, currencyconversion function, new customer registration function, and a chatfunction connecting a user of the user device with a customer servicerepresentative of an online store.

Monitoring a level of customer activity may include monitoring a levelof browsing activity. Monitoring a level of browsing activity mayinclude monitoring a traffic load. The traffic load for a particularonline store may include a count of total requests, being received bythe router or servers, corresponding to an online store, a particularpage of an store (e.g. a product page or product category page), or asubset of pages of an online store. The traffic load may also include acount of total page views corresponding to a graphical user interface ofthe online store.

The level of browsing activity may also include a count of uniquevisitors to the online store. The number of unique visitors may bedetermined by counting the number of uniquely identified clients thatare generating requests or page views within a defined time period. Auniquely identified client may be an instance of a browser client or aclient device. A client may be identified using a unique identifierstored in a browser cookie and/or the IP address of the client device.

The level of browsing activity may also include a count of currentlyactive browsing sessions. A browsing session may refer to a series ofrequests received from a particular client. A browsing session may endor “time out” when the server receives no further requests from theparticular client for a defined time period.

More granular levels of browsing activity may be monitored. For example,a level of browsing activity may include a level of referral, shoppingcart, checkout, order and payment activity. Monitoring each of theselevels of activity may include monitoring a corresponding traffic load.

By way of example, monitoring a level of referral activity may includemonitoring the number of requests received from a particular referralsource. The particular referral source may be identified using referrerinformation included in the request. The referrer information may be inthe form of a web address of a previous webpage from which a link to acurrently requested webpage was followed. For example, the referrer maybe a web address of a webpage, such as a social media or webmailwebpage, that provides a click-through link to the requested webpage.

By way of another example, monitoring a level of shopping cart activitymay include monitoring the number of requests to add a particularproduct to an online shopping cart.

By way of another example, monitoring a level of checkout activity mayinclude monitoring the number of requests received in association with acheckout function of an online store.

By way of another example, monitoring a level of order activity mayinclude monitoring a traffic load or a sales metric. The traffic loadmay include the number of requests received corresponding to orders. Thesales metric may include the total value of products ordered.

By way of another example, monitoring a level of payment activity mayalso include monitoring a traffic load or a sales metric. The trafficload may include a count of requests received corresponding to orderpayments. The sales metric may include the total value of payments made.

The system may store the monitored level of customer activity ashistorical analytics data in the store object 402 of FIG. 4 .

Reference will now be made to FIGS. 6A-F, which show historicalanalytics data in graphic form. More particularly, the graphs showexample results of monitoring the level of customer activity for exampleonline stores. Each graph shows a sales metric, namely daily sales, fora respective example online store over a period of time.

Referring again to FIG. 5 , in operation 504, the system may obtain apolicy. The policy may be stored in memory that is accessible by thesystem. In some embodiments, the policy may be retrieved from the datafacility 134. The policy may specify, for example, a threshold level ofcustomer activity. The threshold may be a minimum threshold or a maximumthreshold.

In operation 506, the system detects, based on the level of customeractivity, a demand-level condition for the particular online store. Thedetermination may be based on the observed level of customer activityand may involve a comparison with the threshold specified by the policy.For example, the observed level of customer activity may be comparedwith a threshold rate specified in the policy. If the comparisonindicates that the observed level of customer activity is above a firstthreshold value, then a high demand-level condition may be detected. Ifthe observed level of customer activity is below a second thresholdvalue, then a low demand-level condition may be detected. The first andsecond thresholds may be the same value or the first threshold value maybe higher than the second threshold value.

In operation 508, the system moves one or more of the plurality ofonline stores from a first server of a plurality of servers to a secondserver of the plurality of servers. The move may be responsive to thedetecting of the demand-level condition for the particular online store.

The first and second servers may have the same rated capacity or mayhave different capacity ratings. A rated capacity of the first servermay be less than or greater than a rated capacity of the second server.In other words, the first server may include increased or decreasedcomputing resources than the second server. Computing resources mayinclude, for example, a quantity or speed of processors or memory. Putanother way, the first server may be configured for servicing apredetermined load higher than a predetermined load of the secondserver, or vice versa.

In response to detecting the demand-level condition, the system mayeither move the particular online store from the first server to thesecond server without moving other online stores or may move one or moreonline stores without moving the particular online store. In otherwords, the online stores that are moved may include only the particularonline store or may not include the particular online store.

If a high demand-level condition is detected, the move may be performedin a manner that increases the resources available to the particularonline store. For example, if the particular online store is hosted onthe first server along with other online stores, one or more of theother online stores may be moved to a second server in order to increasethe unused capacity of the first server.

In some embodiments, if a high demand-level condition is detected, thedetermination of whether to move the particular store may be based onthe current unused capacity of the first and second servers and thecurrent capacity used by the particular online store. The system maydetermine the current unused capacity of the first and second serversand the current capacity used by the particular online store. If theparticular online store is hosted on the first server, and if thecurrent unused capacity of the first server plus the current capacityused by the particular online store first is less than current unusedcapacity of the second server, then the system may move the particularonline store to the second server. In this way, the server resources andunused capacity available to the particular online store may beincreased.

If a low demand-level condition is detected, the move may be performedin a manner that decreases the resources available to the particularonline store. For example, if the particular online store is hosted onthe second server, one or more of the online stores may be moved fromthe first server to a second server in order to decrease the unusedcapacity of the second server.

In some embodiments, if a low demand-level condition is detected, thedetermination of whether to move the particular store may, additionallyor alternatively, be based on the current unused capacity of the firstand second servers and the current capacity used by the particularonline store. The system may determine the current unused capacity ofthe first and second servers and the current capacity used by theparticular online store. For example, if the particular online store ishosted on the first server and the current unused capacity of the secondserver is greater than the current capacity used by the particularonline store, and if the current unused capacity of the first serverless the current capacity used by the particular online store first isgreater than current unused capacity of the second server, then thesystem may move the particular online store to the second server. Inthis way, the server resources and unused capacity available to theparticular online store may be decreased.

Moving an online store from a first server to a second server may refergenerally to moving the servicing of requests from the first server tothe second server. In other words, it may refer to modifying the systemto use the second server to service customer requests corresponding tothe online store instead of the first server. The first server ceases toservice requests associated with the online store and the second servercommences servicing requests associated with the online store.

The system may configure a router to cease directing requestscorresponding to the online store to the first server and queue any newrequests until the second server is ready to begin servicing requestsassociated with the online store. The first server may finish servicingany requests that it has already received in association with the onlinestore and provide responses to customer devices. The second server maybe configured to service requests corresponding to the online store.This operation may depend on how the online store is deployed.

In some embodiments, the online store is a store hosted on an e-commerceplatform that is provided as SaaS. In other words, the online store maybe deployed to a running instance of an e-commerce software applicationthat provides online store hosting as a service. Moving the online storemay include transferring assets (e.g. configuration files, databaseshards, database records, image files) associated with the online storeeither from the first server and/or a different server and configuringan e-commerce software application hosted on the second server withthose assets in order to serve the online store from the second server.In some embodiments, an asset may include the store object 402 of FIG. 4or a portion thereof.

In some embodiments, not all assets corresponding to an online store arestored on the first or second servers or accessible by these servers.For example, static store assets such as image files may be served froma separate file server. Moving an online store from a first server to asecond server may include copying only assets that are stored on thefirst server to the second server. Similarly, not all requestscorresponding to an online store that are received by the system may beserviced by the first or second servers. Other requests, such as orderrequests or payment requests, may be serviced by the first or secondservers. Moving an online store from a first server to a second servermay include directing to the second server and servicing by the secondserver any requests associated with the online store that wouldotherwise have been directed to and serviced by the first server.

In some embodiments, the online store may be a web application that isdeployed to a first installation instance of a web server applicationhosted on the first server. Moving such an online store may includedeploying the web application to a second installation instance of theweb server application hosted on the second server.

In some embodiments, the online store may be hosted on a virtual serverthat is distinct and separate from virtual servers hosting other onlinestores. Moving such an online store may involve stopping a virtualserver that hosts the online store on a first physical server, copying avirtual server file corresponding to the virtual server from the firstphysical server to a second physical server, and restarting the virtualserver on the second physical server.

Once the second server has been configured to service requestscorresponding to the online store, the router may be configured todirect requests corresponding to the online store to the second serverinstead of the first server by updating routing data. The second servermay then receive and service requests associated with the online store.

In operation 510, the server determines, based on a second level ofcustomer activity associated with the online store, the demand-levelcondition for the online store no longer exists and, in response, movesat least one of the one or more of the plurality of online stores awayfrom the second server. The move may be to the first server or to athird server. The online stores that are moved may or may not includethe online stores that were moved in operation 508 and may or may notinclude the online store associated with the second level of customeractivity. The demand-level condition may no longer exist if, forexample, there is a transition from a high demand-level condition to alow-level condition, or vice versa.

Reference will now be made to FIG. 7 , which shows, in flowchart form, asimplified example method 700 for balancing online stores acrossservers. In some embodiments, the operations 702, 704, 706, 710, 712 or714 may correspond to the operation 506 of FIG. 5 and the operation 708of FIG. 7 may correspond to the operation 508 of FIG. 5 . Operations702, 704 and 706 may also correspond to detecting a high demand-levelcondition and, more particularly, to detecting a predicted, current andscheduled high demand-level condition, respectively. Operations 710, 712and 714 may also correspond to detecting a low demand-level conditionand/or to detecting the end of a high demand-level condition.

In operation 702, the system may detect that the level of customeractivity is suggestive of a current flash sale event. The term “flashsale event” may refer generally to a spike in order requests received byan online store. The event may occur for a short period of time that maylast a few seconds, minutes or hours.

A level of customer activity may be a current, recent, or historicallevel of customer activity. A current level of customer activity mayinclude the level of customer activity corresponding to a window of timethat includes the current time. A recent level of customer activity mayinclude the level of customer activity corresponding to one or morewindows of time immediately preceding a current window of time. Thehistorical level of customer activity for an online store may includelevels of customer activity corresponding to historical windows of time,which may include windows of time prior to the current window of time.

An online store may have a “normal” level of customer activity. Thenormal level of customer activity may be determined based on historicallevels of customer activity. In some cases, an average or medianhistorical level of customer activity may be referred to as a normallevel of customer activity.

In order to detect that the monitored level of customer activity issuggestive of a current flash sale event, the system may compare acurrent level of customer activity of the online store to a normal levelof customer activity. If the ratio of the current level of customeractivity to the normal level of customer activity exceeds a thresholdratio, then the current or recent level of customer activity may besuggestive of a current flash sale event.

The threshold ratio may be obtained from a policy and may be specific toan online store or the system. For example, the threshold ratio for ane-commerce platform or an online store may be 10:1. If the systemdetermines that the current rate of order requests is at least ten timesgreater than a normal rate of order requests, then the current level ofcustomer activity is suggestive of a current flash sale event.

The system may additional or alternatively compare a recent level ofcustomer activity of the online store to a normal level of customeractivity. However, in this case, the accuracy of the detection maydepend on the length of the windows of time in which the level ofcustomer activity is monitored. If the windows of time are short, forexample, one or five seconds in length, then the recent level ofcustomer activity may be a close approximation of the current level ofcustomer activity.

In order to detect that the monitored level of customer activity issuggestive of a current flash sale event, the system may also determinewhether the change in the level of customer activity, from a normallevel of customer activity to the current or recent level of customeractivity, is sudden. In other words, the detection may be based ondetermining that the rate of change in the level of customer activityexceeds a threshold rate of change. For example, the system may measurethe time that has elapsed from when the normal level of customeractivity was last observed to the current time. The elapsed time may becompared with a threshold time. If the elapsed time is less than thethreshold time, then the monitored level of customer activity may besuggestive of a current flash sale event.

Reference is now made to FIGS. 6A-F, which show historical levels ofcustomer activity for example online stores. In these examples, thedaily sales for example online stores are shown over a period of time.In these examples, if a threshold ratio of 10:1 is used, various spikesin sales as shown in the graphs of FIGS. 6A-E may be detected as beingsuggestive of a current flash sale event, whereas the sale metric shownin the graph of FIG. 6F has a current to normal ratio that peaks atabout 4:1, which would not be considered sufficient to be suggestive ofa current flash sale event.

Referring again to FIG. 7 , in operation 704, the system may detect apredicted flash sale event. A flash sale event for an online store maybe predicted based on a current level of customer activity. As anexample, a flash sale event may be predicted based on detecting acurrent spike in traffic. More particularly, detecting a predicted flashsale event may include determining that the rate of change in the levelof customer activity exceeds a threshold rate of change. For example, apredicted flash sale event may be detected by determining that anacceleration (i.e. positive rate of change) in sales exceeds a thresholdrate of change in sales.

In operation 706, the system may detect a scheduled flash sale event.Detecting a scheduled flash sale event may include determining that thesystem is scheduled to automatically perform a store-specific action ata scheduled future time.

In operation 708, in response to detecting that the level of customeractivity is suggestive of a current flash sale event, or detecting thepredicted flash sale event, or detecting the scheduled flash sale event,the system may move one or more of the plurality of online stores from afirst server of a plurality of servers to a second server of theplurality of servers.

In operation 710, subsequent to detecting a predicted flash sale eventin operation 704, the system may determine that the prediction is false.A false prediction may be detected if the system fails to detect, withina threshold period of time after detecting the predicted flash saleevent, that a level of customer activity is suggestive of a currentflash sale event as in operation 702.

In operation 712, subsequent to detecting the scheduled flash sale eventin operation 706, the system may detect that the scheduled action hasbeen cancelled.

In operation 714, subsequent to detecting that the level of customeractivity is suggestive of a current flash sale event in operation 702,or detecting a predicted flash sale event in operation 704, orsubsequent to detecting that the scheduled flash sale event in operation706, the system may detect that a level of customer activity is notsuggestive of a flash sale event. In other words, the system may detectthat a flash sale has ended. In some embodiments, that system may detectthat the level of customer activity has returned to a normal level ofcustomer activity or within a threshold amount of a normal level ofcustomer activity.

For example, subsequent to detecting that the level of customer activityis suggestive of a current flash sale event in operation 702, the systemmay determine that the level of customer activity is no longersuggestive of a current flash sale event.

As another example, subsequent to detecting that the predicted flashsale event in operation 702, the system may determine that the level ofcustomer activity is suggestive of a current flash sale event and,subsequent to that operation, the system may determine that the level ofcustomer activity is no longer suggestive of a current flash sale event.In other words, the system may determine that the prediction was correctand that the flash sale has ended.

As another example, subsequent to detecting the scheduled flash saleevent in operation 706, the system may perform the scheduled action andthen determine that the level of customer activity is suggestive of acurrent flash sale event and, subsequent to that operation, the systemmay determine that the level of customer activity is no longersuggestive of a current flash sale event. In other words, the system maydetermine that performing the scheduled action resulted in a flash saleevent and that the flash sale has ended.

In operation 716, subsequent to detecting the scheduled flash sale eventin operation 706, the system may perform the scheduled action. If thesystem then fails to detect, within a threshold period of time afterdetecting the predicted flash sale event, that a level of customeractivity is suggestive of a current flash sale event as in operation702, the system may determine that performing the scheduled action didnot trigger a flash sale event.

In operation 710, in response to detecting that the prediction is false,or determining that the current or scheduled flash sale events hasended, or determining that a flash sale event was not triggered byperforming the scheduled action, the system may move one or more of theplurality of online stores from the second server of a plurality ofservers to the first server or to a third server (that is not the firstserver) of the plurality of servers. In some embodiments, the move maybe responsive to the system operating, for a threshold period of time,without detecting a level of customer activity that is suggestive of acurrent flash sale event, without detecting a predicted flash saleevent, and/or without detecting a scheduled flash sale event. In someembodiments, the move may include reversing the move that had been madepreviously in response to operations 702, 704 or 706 of FIG. 7 .

Implementations

The methods and systems described herein may be deployed in part or inwhole through a machine that executes computer software, program codes,and/or instructions on a processor. The processor may be part of aserver, cloud server, client, network infrastructure, mobile computingplatform, stationary computing platform, or other computing platform. Aprocessor may be any kind of computational or processing device capableof executing program instructions, codes, binary instructions and thelike. The processor may be or include a signal processor, digitalprocessor, embedded processor, microprocessor or any variant such as aco-processor (math co-processor, graphic co-processor, communicationco-processor and the like) and the like that may directly or indirectlyfacilitate execution of program code or program instructions storedthereon. In addition, the processor may enable execution of multipleprograms, threads, and codes. The threads may be executed simultaneouslyto enhance the performance of the processor and to facilitatesimultaneous operations of the application. By way of implementation,methods, program codes, program instructions and the like describedherein may be implemented in one or more threads. The thread may spawnother threads that may have assigned priorities associated with them;the processor may execute these threads based on priority or any otherorder based on instructions provided in the program code. The processormay include memory that stores methods, codes, instructions and programsas described herein and elsewhere. The processor may access a storagemedium through an interface that may store methods, codes, andinstructions as described herein and elsewhere. The storage mediumassociated with the processor for storing methods, programs, codes,program instructions or other type of instructions capable of beingexecuted by the computing or processing device may include but may notbe limited to one or more of a CD-ROM, DVD, memory, hard disk, flashdrive, RAM, ROM, cache and the like.

A processor may include one or more cores that may enhance speed andperformance of a multiprocessor. In some embodiments, the process may bea dual core processor, quad core processors, other chip-levelmultiprocessor and the like that combine two or more independent cores(called a die).

The methods and systems described herein may be deployed in part or inwhole through a machine that executes computer software on a server,cloud server, client, firewall, gateway, hub, router, or other suchcomputer and/or networking hardware. The software program may beassociated with a server that may include a file server, print server,domain server, internet server, intranet server and other variants suchas secondary server, host server, distributed server and the like. Theserver may include one or more of memories, processors, computerreadable media, storage media, ports (physical and virtual),communication devices, and interfaces capable of accessing otherservers, clients, machines, and devices through a wired or a wirelessmedium, and the like. The methods, programs or codes as described hereinand elsewhere may be executed by the server. In addition, other devicesrequired for execution of methods as described in this application maybe considered as a part of the infrastructure associated with theserver.

The server may provide an interface to other devices including, withoutlimitation, clients, other servers, printers, database servers, printservers, file servers, communication servers, distributed servers andthe like. Additionally, this coupling and/or connection may facilitateremote execution of programs across the network. The networking of someor all of these devices may facilitate parallel processing of a programor method at one or more locations without deviating from the scope ofthe disclosure. In addition, any of the devices attached to the serverthrough an interface may include at least one storage medium capable ofstoring methods, programs, code and/or instructions. A centralrepository may provide program instructions to be executed on differentdevices. In this implementation, the remote repository may act as astorage medium for program code, instructions, and programs.

The software program may be associated with a client that may include afile client, print client, domain client, internet client, intranetclient and other variants such as secondary client, host client,distributed client and the like. The client may include one or more ofmemories, processors, computer readable media, storage media, ports(physical and virtual), communication devices, and interfaces capable ofaccessing other clients, servers, machines, and devices through a wiredor a wireless medium, and the like. The methods, programs or codes asdescribed herein and elsewhere may be executed by the client. Inaddition, other devices required for execution of methods as describedin this application may be considered as a part of the infrastructureassociated with the client.

The client may provide an interface to other devices including, withoutlimitation, servers, other clients, printers, database servers, printservers, file servers, communication servers, distributed servers andthe like. Additionally, this coupling and/or connection may facilitateremote execution of programs across the network. The networking of someor all of these devices may facilitate parallel processing of a programor method at one or more locations without deviating from the scope ofthe disclosure. In addition, any of the devices attached to the clientthrough an interface may include at least one storage medium capable ofstoring methods, programs, applications, code and/or instructions. Acentral repository may provide program instructions to be executed ondifferent devices. In this implementation, the remote repository may actas a storage medium for program code, instructions, and programs.

The methods and systems described herein may be deployed in part or inwhole through network infrastructures. The network infrastructure mayinclude elements such as computing devices, servers, routers, hubs,firewalls, clients, personal computers, communication devices, routingdevices and other active and passive devices, modules and/or componentsas known in the art. The computing and/or non-computing device(s)associated with the network infrastructure may include, apart from othercomponents, a storage medium such as flash memory, buffer, stack, RAM,ROM and the like. The processes, methods, program codes, instructionsdescribed herein and elsewhere may be executed by one or more of thenetwork infrastructural elements.

The methods, program codes, and instructions described herein andelsewhere may be implemented in different devices which may operate inwired or wireless networks. Examples of wireless networks include 4thGeneration (4G) networks (e.g. Long Term Evolution (LTE)) or 5thGeneration (5G) networks, as well as non-cellular networks such asWireless Local Area Networks (WLANs). However, the principles describedtherein may equally apply to other types of networks.

The operations, methods, programs codes, and instructions describedherein and elsewhere may be implemented on or through mobile devices.The mobile devices may include navigation devices, cell phones, mobilephones, mobile personal digital assistants, laptops, palmtops, netbooks,pagers, electronic books readers, music players and the like. Thesedevices may include, apart from other components, a storage medium suchas a flash memory, buffer, RAM, ROM and one or more computing devices.The computing devices associated with mobile devices may be enabled toexecute program codes, methods, and instructions stored thereon.Alternatively, the mobile devices may be configured to executeinstructions in collaboration with other devices. The mobile devices maycommunicate with base stations interfaced with servers and configured toexecute program codes. The mobile devices may communicate on a peer topeer network, mesh network, or other communications network. The programcode may be stored on the storage medium associated with the server andexecuted by a computing device embedded within the server. The basestation may include a computing device and a storage medium. The storagedevice may store program codes and instructions executed by thecomputing devices associated with the base station.

The computer software, program codes, and/or instructions may be storedand/or accessed on machine readable media that may include: computercomponents, devices, and recording media that retain digital data usedfor computing for some interval of time; semiconductor storage known asrandom access memory (RAM); mass storage typically for more permanentstorage, such as optical discs, forms of magnetic storage like harddisks, tapes, drums, cards and other types; processor registers, cachememory, volatile memory, non-volatile memory; optical storage such asCD, DVD; removable media such as flash memory (e.g. USB sticks or keys),floppy disks, magnetic tape, paper tape, punch cards, standalone RAMdisks, Zip drives, removable mass storage, off-line, and the like; othercomputer memory such as dynamic memory, static memory, read/writestorage, mutable storage, read only, random access, sequential access,location addressable, file addressable, content addressable, networkattached storage, storage area network, bar codes, magnetic ink, and thelike.

The methods and systems described herein may transform physical and/oror intangible items from one state to another. The methods and systemsdescribed herein may also transform data representing physical and/orintangible items from one state to another, such as from usage data to anormalized usage dataset.

The elements described and depicted herein, including in flow charts andblock diagrams throughout the figures, imply logical boundaries betweenthe elements. However, according to software or hardware engineeringpractices, the depicted elements and the functions thereof may beimplemented on machines through computer executable media having aprocessor capable of executing program instructions stored thereon as amonolithic software structure, as standalone software modules, or asmodules that employ external routines, code, services, and so forth, orany combination of these, and all such implementations may be within thescope of the present disclosure. Examples of such machines may include,but may not be limited to, personal digital assistants, laptops,personal computers, mobile phones, other handheld computing devices,medical equipment, wired or wireless communication devices, transducers,chips, calculators, satellites, tablet PCs, electronic books, gadgets,electronic devices, devices having artificial intelligence, computingdevices, networking equipment, servers, routers and the like.Furthermore, the elements depicted in the flow chart and block diagramsor any other logical component may be implemented on a machine capableof executing program instructions. Thus, while the foregoing drawingsand descriptions set forth functional aspects of the disclosed systems,no particular arrangement of software for implementing these functionalaspects should be inferred from these descriptions unless explicitlystated or otherwise clear from the context. Similarly, it will beappreciated that the various steps identified and described above may bevaried, and that the order of steps may be adapted to particularapplications of the techniques disclosed herein. All such variations andmodifications are intended to fall within the scope of this disclosure.As such, the depiction and/or description of an order for various stepsshould not be understood to require a particular order of execution forthose steps, unless required by a particular application, or explicitlystated or otherwise clear from the context.

The methods and/or processes described above, and steps thereof, may berealized in hardware, software or any combination of hardware andsoftware suitable for a particular application. The hardware may includea general-purpose computer and/or dedicated computing device or specificcomputing device or particular aspect or component of a specificcomputing device. The processes may be realized in one or moremicroprocessors, microcontrollers, embedded microcontrollers,programmable digital signal processors or other programmable devices,along with internal and/or external memory. The processes may also, orinstead, be embodied in an application specific integrated circuit, aprogrammable gate array, programmable array logic, or any other deviceor combination of devices that may be configured to process electronicsignals. It will further be appreciated that one or more of theprocesses may be realized as a computer executable code capable of beingexecuted on a machine readable medium.

The computer executable code may be created using a structuredprogramming language such as C, an object oriented programming languagesuch as C++, or any other high-level or low-level programming language(including assembly languages, hardware description languages, anddatabase programming languages and technologies) that may be stored,compiled or interpreted to run on one of the above devices, as well asheterogeneous combinations of processors, processor architectures, orcombinations of different hardware and software, or any other machinecapable of executing program instructions.

Thus, in one aspect, each method described above, and combinationsthereof may be embodied in computer executable code that, when executingon one or more computing devices, performs the steps thereof. In anotheraspect, the methods may be embodied in systems that perform the stepsthereof and may be distributed across devices in a number of ways, orall of the functionality may be integrated into a dedicated, standalonedevice or other hardware. In another aspect, the means for performingthe steps associated with the processes described above may include anyof the hardware and/or software described above. All such permutationsand combinations are intended to fall within the scope of the presentdisclosure.

1. A computer-implemented method for balancing online stores acrossservers: monitoring a level of customer activity associated with aparticular online store in a plurality of online stores; detecting,based on the level of customer activity, a demand-level condition forthe particular online store; and responsive to the detecting of thedemand-level condition for the particular online store, moving one ormore of the plurality of online stores from a first server of aplurality of servers to a second server of the plurality of servers,wherein moving one or more of the plurality of online stores from thefirst server of the plurality of servers to the second server of theplurality of servers includes: ceasing to service, by the first server,requests associated with the particular online store; and commencing toservice, by the second server, requests associated with the particularonline store.
 2. The method of claim 1, wherein detecting thedemand-level condition includes detecting that the level of customeractivity is suggestive of a current flash sale event.
 3. The method ofclaim 1, wherein detecting the demand-level condition includes detectinga projected flash sale event.
 4. The method of claim 1, whereindetecting the demand-level condition includes detecting a scheduledflash sale event.
 5. The method of claim 1, wherein the demand-levelcondition includes a high demand-level condition.
 6. The method of claim1, wherein the demand-level condition includes a low demand-levelcondition.
 7. The method of claim 1, further comprising determining,based on a second level of customer activity, the demand-level conditionno longer exists and, in response, moving at least one of the one ormore of the plurality of online stores away from the second server. 8.The method of claim 1, wherein moving the one or more of the pluralityof online stores includes moving the particular online store.
 9. Themethod of claim 1, wherein the second server has increased computingresources in comparison to the first server.
 10. The method of claim 1,wherein moving the one or more of the plurality of online stores doesnot include moving the particular online store.
 11. A system, the systemcomprising: a processor; and a memory storing computer-executableinstructions that, when executed by the processor, are to cause theprocessor to: monitor a level of customer activity associated with aparticular online store in a plurality of online stores; detect, basedon the level of customer activity, a demand-level condition for theparticular online store; and responsive to the detecting of thedemand-level condition for the particular online store, move one or moreof the plurality of online stores from a first server of a plurality ofservers to a second server of the plurality of servers,. wherein theinstructions that cause the processor to move one or more of theplurality of online stores from the first server of the plurality ofservers to the second server of the plurality of servers further includeinstructions that cause the processor to: cease servicing, by the firstserver, requests associated with the particular online store; andcommence servicing, by the second server, requests associated with theparticular online store.
 12. The system of claim 11, wherein detectingthe demand-level condition includes detecting that the level of customeractivity is suggestive of a current flash sale event.
 13. The system ofclaim 11, wherein detecting the demand-level condition includesdetecting a projected flash sale event.
 14. The system of claim 11,wherein detecting the demand-level condition includes detecting ascheduled flash sale event.
 15. The system of claim 11, wherein thedemand-level condition includes a high demand-level condition.
 16. Thesystem of claim 11, wherein the demand-level condition includes a lowdemand-level condition.
 17. The system of claim 11, wherein theinstructions, when executed by the processor, are to cause the processorto determine, based on a second level of customer activity, thedemand-level condition no longer exists and, in response, move at leastone of the one or more of the plurality of online stores away from thesecond server.
 18. The system of claim 11, wherein moving the one ormore of the plurality of online stores includes moving the particularonline store.
 19. The system of claim 11, wherein the second server hasincreased computing resources in comparison to the first server.
 20. Anon-transitory computer-readable medium storing processor-executableinstructions that, when executed by one or more processors, are to causethe one or more processors to: monitor a level of customer activityassociated with a particular online store in a plurality of onlinestores; detect, based on the level of customer activity, a demand-levelcondition for the particular online store; and responsive to thedetecting of the demand-level condition for the particular online store,move one or more of the plurality of online stores from a first serverof a plurality of servers to a second server of the plurality ofservers,. wherein the instructions that are to cause the one or moreprocessors to move one or more of the plurality of online stores fromthe first server of the plurality of servers to the second server of theplurality of servers further include instructions that are to cause theone or more processors to: cease servicing, by the first server,requests associated with the particular online store; and commenceservicing, by the second server, requests associated with the particularonline store.